<template>
    <div>
        欢迎{{nickname}}回来！<br>
        <button type="button" @click="outLogin()">安全退出</button>
    </div>
</template>

<script>
    export default {
        name: "ucenter",
        data(){
            return {
                nickname:localStorage['nickname']
            }
        },
        methods:{
            outLogin(){
                localStorage.clear();
                this.$router.replace("/login");
            }
        }
    }
</script>

<style scoped>

</style>